package cn.autoOffice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling//开启定时任务
@MapperScan("cn.autoOffice.mapper")
public class WebApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {

        //使用classpath下的activiti.cfg.xml中的配置创建processEngine
//        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
//        System.out.println(processEngine);

        SpringApplication.run(WebApplication.class, args);
        SpringApplication springApplication = new SpringApplication(WebApplication.class);

    }

    /*
    * @Description:定时任务
    * @param:[application]
    * @return:org.springframework.boot.builder.SoringApplicationBuilder
    * */

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application){
        return application.sources(WebApplication.class);
    }

}
